#ifndef __APDUPROC_HANDLER_GM_H__
#define __APDUPROC_HANDLER_GM_H__

	#define CMD_DEV_SETDEVINFO									0x02
	#define CMD_DEV_GETDEVINFO									0x04

	#define CMD_AUTH_DEVAUTH									0x10
	#define CMD_AUTH_CHANGEDEVAUTHKEY							0x12
	#define CMD_AUTH_GETPININFO									0x14
	#define CMD_AUTH_CHANGEPIN									0x16
	#define CMD_AUTH_VERFYPIN									0x18
	#define CMD_AUTH_UNBLOCKPIN									0x1A
	#define CMD_AUTH_CLEARSECUERSTATE							0x1C

	#define CMD_APP_CREATEAPP									0x20
	#define CMD_APP_ENUMAPP										0x22
	#define CMD_APP_DELETEAPP									0x24
	#define CMD_APP_OPENAPP										0x26
	#define CMD_APP_CLOSEAPP									0x28

	#define CMD_FILE_CREATEFILE									0x30
	#define CMD_FILE_DELETEFILE									0x32
	#define CMD_FILE_ENUMFILES									0x34
	#define CMD_FILE_GETFILEINFO								0x36
	#define CMD_FILE_READFILE									0x38
	#define CMD_FILE_WRITEFILE									0x3A

	#define CMD_CONTAINER_CREATECONTAINER						0x40
	#define CMD_CONTAINER_OPENCONTAINER							0x42
	#define CMD_CONTAINER_CLOSECONTAINER						0x44
	#define CMD_CONTAINER_ENUMCONTAINERS						0x46
	#define CMD_CONTAINER_DELETECONTAINER						0x48
	#define CMD_CONTAINER_GETCONTAINERINFO						0x4A
	#define CMD_CONTAINER_IMPORTCONTAINER						0x4C
	#define CMD_CONTAINER_EXPORTCONTAINER						0x4E

	#define CMD_CRYPT_GETREALRANDOM								0x50
	#define CMD_CRYPT_GENRSAKEYPAIR								0x54
	#define CMD_CRYPT_IMPORTRSAKEYPAIR							0x56
	#define CMD_CRYPT_RSASIGNDATA								0x58
	#define CMD_CRYPT_RSAVERIFY									0x5E
	#define CMD_CRYPT_RSAEXPORTSESSIONKEY						0x5A
	#define CMD_CRYPT_RSAEXPORTSESSIONKEYEX						0x5C
	#define CMD_CRYPT_EXTRSAPUBKEYOPERATION						0x60

	#define CMD_CRYPT_GENECCKEYPAIR								0x70
	#define CMD_CRYPT_IMPORTSM2KEYPAIR							0x72
	#define CMD_CRYPT_ECCSIGNDATA								0x74
	#define CMD_CRYPT_ECCVERIFY									0x76
	#define CMD_CRYPT_SM2EXPORTSESSIONKEY						0x78
	#define CMD_CRYPT_SM2EXPORTSESSIONKEYEX						0x80
	#define CMD_CRYPT_EXTSM2ENCRYPT								0x7A
	#define CMD_CRYPT_GENERATEAGREEMENTDATAWITHSM2				0x82
	#define CMD_CRYPT_GENERATEAGREEMENTDATAANDKEYWITHSM2		0x84
	#define CMD_CRYPT_GENERATEKEYWITHSM2						0x86
	#define CMD_CRYPT_EXPORTPUBLICKEY							0x88
	#define CMD_CRYPT_IMPORTSESSIONKEY							0xA0

	#define CMD_CRYPT_ENCRYPTINIT								0xA4
	#define CMD_CRYPT_ENCRYPT									0xA6
	#define CMD_CRYPT_ENCRYPTUPDATE								0xA8
	#define CMD_CRYPT_ENCRYPTFINAL								0xAA
	#define CMD_CRYPT_DECRYPTINIT								0xAC
	#define CMD_CRYPT_DECRYPT									0xAE
	#define CMD_CRYPT_DECRYPTUPDATE								0xB0
	#define CMD_CRYPT_DECRYPTFINAL								0xB2

	#define CMD_CRYPT_DIGESTINIT								0xB4
	#define CMD_CRYPT_DIGEST									0xB6
	#define CMD_CRYPT_DIGESTUPDATE								0xB8
	#define CMD_CRYPT_DIGESTFINAL								0xBA

	#define CMD_CRYPT_MACINIT									0xBC
	#define CMD_CRYPT_MAC										0xBE
	#define CMD_CRYPT_MACUPDATE									0xC0
	#define CMD_CRYPT_MACFINAL									0xC2

	#define CMD_CRYPT_DESTROYSESSIONKEY							0xC4

	extern void ApduProc_Handler_GM(UINT8 Ins);

#endif
